new Vue({
	el:"#vue_app",
	data:{
		name:"",
		age:24,
		X:0,
		Y:0
	},
	methods:{
		subtract:function(){
			if(this.age == 0){
				this.age = this.age
				return
			}
			this.age--;
		},
		logName:function(){
			this.name = this.$refs.logname.value;
		},
		logAge:function(){
			this.name = this.$refs.logage.value;
		},
		updateXY:function(event){
			this.X = event.offsetX;
			this.Y = event.offsetY;
		},
		stopmoving:function(event){
			event.stopPropagation();
		},
		alert:function(){
			alert("hello word");
		}
	}

});

/**
 * 获取输入输出框的值  双向绑定  班阔文本域  input select
 * updateXY方法中的event是鼠标事件自带的   //获取当前鼠标的XY坐标
 * event.stopPropagation();阻止冒泡事件
 */
